package com.ezcolour.ticket.web.controller;

import com.ezcolour.ticket.base.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 *  web端页面跳转控制中心
 *
 * @author rhp
 * @date 2017-08-23 9:23
 */
@Controller
@RequestMapping("/web/page")
public class PageWebController extends BaseController {



    /**
     * 跳转到主页
     */
    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public String home(Model model) {
        return "/web/select";
    }

    /**
     * 跳转到登录页面
     */
    @RequestMapping(value = "/auth", method = RequestMethod.GET)
    public String toLogin(Model model) {
        return "/web/login";
    }

    /**
     * 跳转到注册页面
     */
    @RequestMapping(value = "/register", method = RequestMethod.GET)
    public String toRegister(Model model) {
        return "/web/register";
    }

    /**
     * 跳转到抢票页面
     */
    @RequestMapping(value = "/select", method = RequestMethod.GET)
    public String ticket(Model model/*,String account*/) {
//        model.addAttribute("account",account);
        return "/web/select";
    }

    /**
     * 跳转到列表页
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public String order() {
        return "/web/home";
    }
}
